package com.rainbowBoot.login.service.impl;

import com.rainbowBoot.login.service.LoginService;
import com.rainbowBoot.login.dao.LoginDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("LoginService")
public class LoginServiceImpl implements LoginService {

    @Autowired
    private LoginDao loginDao;

    /**
     * 登陆
     * @param username
     * @param password
     * @return
     */
    @Override
    public boolean login(String username, String password) {
        if(loginDao.login(username, password).size() != 0) {
            return true;
        }
        return false;
    }
}
